﻿using Common.Communication;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DeviceBase.Interfaces
{
    public interface IDevice
    {
        string Name { get; set; }
        //Result Init(DeviceConfig config);
        /// <summary>
        /// 是否是连接的
        /// </summary>
        bool IsConnected { get; }
        /// <summary>
        /// 打开连接（如果已经是连接状态会先关闭再打开）
        /// </summary>
        /// <returns></returns>
        Result Open();
        /// <summary>
        /// 关闭连接
        /// </summary>
        /// <returns></returns>
        Result Close();

    }
}
